// pages/index/exam.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[
      
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.selectComponent('.scroll').refresh();

  },

  refresh(res) {
    let data = res.detail.data.data;
    this.data.list = data;
    this.setData({
      list: this.data.list
    });
  },
  more(res) {
    let data = res.detail.data.data;
    this.data.list.push(...data);
    this.setData({
      data: data
    });
  },
  toview(e) {
    let id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '/pages/report/success?id=' + id
    });
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    this.selectComponent('.scroll').more();
  },
})